package com.cmwa.solution.business.register.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cmwa.solution.base.entity.Page;
import com.cmwa.solution.base.entity.SearchParam;
import com.cmwa.solution.business.register.entity.CustCapitalChkVo;
import com.cmwa.solution.business.register.entity.CustInfoVo;
import com.cmwa.solution.business.register.entity.CustPortionChkVo;
import com.cmwa.solution.business.register.entity.CustTradeChkVo;
import com.cmwa.solution.business.register.service.SalesDataCheckService;

/**
 * @author ex-wuh2
 *	销售数据对账业务层
 */
@Controller
@RequestMapping("/business/salesDataCheck")
public class SalesDataCheckController {
	
	private final static String JSP_PATH = "business/register/custDataChk/";

	@Autowired
	private SalesDataCheckService salesDataCheckService;
	
	/**
	 * 	跳转至一级菜单展示页
	 * @return
	 */
	@RequestMapping("/salesDataCheckOverView")
	public String salesDataCheckOverView() {
		return JSP_PATH + "salesDataCheckOverView";
	}
	
	/**
	 * 	客户信息报表页
	 * @return
	 */
	@RequestMapping("/custInfoReportPageView")
	public String goCustInfoReportPageView() {
		return JSP_PATH + "custInfoReport";
	}
	
	/**
	 * 	客户份额对账报表页
	 * @return
	 */
	@RequestMapping("/custPortionChkReportPageView")
	public String goCustPortionChkReportPageView() {
		return JSP_PATH + "custPortionChkReport";
	}
	
	/**
	 * 	客户交易对账报表页
	 * @return
	 */
	@RequestMapping("/custTradeChkReportPageView")
	public String goCustTradeChkReportPageView() {
		return JSP_PATH + "custTradeChkReport";
	}
	
	/**
	 * 	客户资金对账报表页
	 * @return
	 */
	@RequestMapping("/custCapitalChkReportPageView")
	public String goCustCapitalChkReportPageView() {
		return JSP_PATH + "custCapitalChkReport";
	}

	/**
	 * 	客户信息分页数据
	 * @param sp
	 * @return
	 */
	@RequestMapping("/custInfoListPage")
	@ResponseBody
	public Page<CustInfoVo> queryCustInfoListPage(SearchParam sp){
		Page<CustInfoVo> listPage = salesDataCheckService.queryCustInfoListPage(sp);
		return listPage;
	}
	
	/**
	 * 	客户份额对账分页数据
	 * @param sp
	 * @return
	 */
	@RequestMapping("/custPortionListPage")
	@ResponseBody
	public Page<CustPortionChkVo> queryCustPortionListPage(SearchParam sp){
		Page<CustPortionChkVo> listPage = salesDataCheckService.queryCustPortionListPage(sp);
		return listPage;
	}
	
	/**
	 * 	客户交易对账分页数据
	 * @param sp
	 * @return
	 */
	@RequestMapping("/custTradeListPage")
	@ResponseBody
	public Page<CustTradeChkVo> queryCustTradeListPage(SearchParam sp){
		Page<CustTradeChkVo> listPage = salesDataCheckService.queryCustTradeListPage(sp);
		return listPage;
	}
	
	/**
	 * 	客户资金对账分页数据
	 * @param sp
	 * @return
	 */
	@RequestMapping("/custCapitalListPage")
	@ResponseBody
	public Page<CustCapitalChkVo> queryCustCapitalListPage(SearchParam sp){
		Page<CustCapitalChkVo> listPage = salesDataCheckService.queryCustCapitalChkListPage(sp);
		return listPage;
	}
	
}
